package com.zzuli.yxy.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.usermodel.FillPatternType;

import java.util.List;

/**
 * 角色信息
 * @auther pony
 * @create 2023-03-28 15:24
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ContentRowHeight(20) //设置内容高度
@HeadRowHeight(20) //设置标题高度
@ColumnWidth(10) //列宽
//标题背景色设为绿色 42
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 42)
//标题字体
@HeadFontStyle(fontHeightInPoints = 10)
public class Role {
    @ColumnWidth(5) //列宽
    @ExcelProperty("序号")
    private Integer id; //角色id
    @ColumnWidth(20) //列宽
    @ExcelProperty("角色名称")
    private String name; //角色名称
    @ColumnWidth(40) //列宽
    @TableField(exist = false)
    @ExcelProperty("拥有的权限")
    private List<String> menuName; //角色所拥有权限名称
    @ExcelProperty("关键字")
    private String roleKey; //角色权限字符串
    @ExcelProperty("状态")
    private Integer status; //角色状态
    @ColumnWidth(40) //列宽
    @ExcelProperty("备注")
    private String remarks; //角色备注信息
}
